<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="Content-Style-Type"  content="text/css" />
	<meta http-equiv="Content-Script-Type" content="text/javascript" />
	<title>JSmarty Compiler Debugger</title>
	<link rel="stylesheet" type="text/css" href="./styles/default.css" />
	<style type="text/css">
	#result, #resource
	{
		width: 100%; height: 160px;
	}
	</style>
	<script type="text/javascript" src="../lib/JSmarty.js"></script>
	<script type="text/javascript" src="../src/scripts/JSmarty/Compiler.js"></script>
	<script type="text/javascript" src="../src/scripts/JSmarty/Compiler/Context.js"></script>
	<script type="text/javascript" src="../src/scripts/JSmarty/Compiler/Module.js"></script>
	<script type="text/javascript" src="../src/scripts/JSmarty/Compiler/define.js"></script>

	<script type="text/javascript">
	compiler = new JSmarty.Compiler
	({
		left_delimiter:'{',
		right_delimiter:'}',
		plugins_dir : ['../lib/plugins','plugins']
	});

	window.onload = function()
	{
		var idResult = document.getElementById('result');
		var idResource = document.getElementById('resource');

		idResource.onkeyup = function()
		{
			var s = new Date();
			var result = compiler.execute(this.value);
			var e = new Date();
			idResult.value = result + (e.getTime() - s.getTime());
		};
	};
	</script>
</head>
<body>

<div class="header" id="header">
<div class="col01"><h1>JSmarty</h1></div>
<div class="col02">JSmarty Compiler Debugger</div>
</div>

<div class="main" id="main">
	<h2>Template Resource</h2>
	<textarea id="resource"></textarea>
	<h2>Compile Result</h2>
	<textarea id="result"></textarea>
	<div class="footer">
		powerd by JSmarty
		<script type="text/javascript">document.write(JSmarty.VERSION);</script>
	</div>
</div>
<div class="sidebar" id="sidebar"><h2>Sample Templates</h2>
</div>

</body>
</html>